package com.gsnd.gsnd22estore.mapper;


import com.gsnd.gsnd22estore.domain.EsOrder;
import com.gsnd.gsnd22estore.dto.OrderItemsDTO;
import com.gsnd.gsnd22estore.dto.OrderPaySuccessDTO;
import com.gsnd.gsnd22estore.dto.QueryOrderDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity com.gsnd.gsnd22estore.domain.EsOrder
 */
public interface EsOrderMapper {

    // 条件查询订单
    List<QueryOrderDTO> selectByCondition(@Param("userId") Integer userId,
                                          @Param("orderId") String orderId,
                                          @Param("status") Integer status);
    // 根据订单id查询订单项
    List<OrderItemsDTO> selectItemByOrderId(String orderId);

    // 插入订单
    void insert(EsOrder order);

    EsOrder selectOrderById(@Param("orderId") String orderId);

    void paySuccess( OrderPaySuccessDTO paySuccessDTO);

    void completeOrder(@Param("orderId") String orderId);

    void updateStatusToClose(@Param("orderId") String orderId);

}




